﻿@model WebEntities.Models.WebInfo.HonorType

@{
    ViewBag.Title = "网站管理平台_编辑类别";
}

@(Html.X().Viewport()
    .Layout("fit")
    .Items(
        Html.X().FormPanel()
            .ID("FormPanel1")
            .Layout("fit")
            .Items(
                Html.X().Panel()
                    .Border(false)
                    .Padding(5)
                    .Layout("form")
                    .Defaults(
                        Html.X().Parameter().Name("AnchorHorizontal").Value("90%")
                    )
                    .Items(
                        Html.X().HiddenFor(m => m.HonorTypeID).ID("HonorTypeID"),
                        Html.X().TextFieldFor(m => m.HonorTypeName).ID("HonorTypeName").FieldLabel("荣誉类别名称").AllowBlank(false).MaxLength(30)
                    )
            )
            .TopBar(
                Html.X().Toolbar().Items(
                    Html.X().Button().Text("保存").Icon(Icon.Disk)
                        .DirectEvents(de =>
                        {
                            de.Click.Action = "EditHonorType";
                            de.Click.EventMask.ShowMask = true;
                            de.Click.EventMask.Msg = "正在保存";
                            de.Click.Success = "ext.net.comjs.onSubmitSuccess";
                            de.Click.Failure = "ext.net.comjs.onSubmitFailure";
                        })
                        .Listeners(ls =>
                        {
                            ls.Click.Handler = "return ext.net.comjs.onFormSubmit()";
                        })
                )
            )
            .BottomBar(Html.X().StatusBar().DefaultText("Ready"))
                .Listeners(ls => ls.ValidityChange.Handler = "ext.net.comjs.setFormStatusBar(this, valid)")
    )
)